// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   AccountProfileProcessor.java

package com.boci.clientapp.profile.processor;

import com.boci.clientapp.profile.vo.AccountProfileVO;
import com.boci.common.constant.RequestTypeConst;
import com.boci.common.processor.AbstractResponseProcessor;
import com.boci.common.vo.ResponseVO;

public class AccountProfileProcessor extends AbstractResponseProcessor
{

    public AccountProfileProcessor(String pXML, String pReqType)
        throws Exception
    {
        super(pXML, pReqType, "PROFILE.ERROR_");
    }

    public ResponseVO processXML()
        throws Exception
    {
        AccountProfileVO accountProfileVO = new AccountProfileVO(getReqType(), getReturnCode());
        if(getReqType().equals(RequestTypeConst.BOCI_ACCT_PROF_EDIT_URL))
        {
            return accountProfileVO;
        } else
        {
            String strEngName = getNodeValue("ENG_NAME");
            String strBankAccNum = getNodeValue("BANK_ACCOUNT_NUM");
            String strBankAccName = getNodeValue("BANK_ACCOUNT_NAME");
            String strBankAccCur = getNodeValue("BANK_ACCOUNT_CURRENCY");
            String strBankAccNotice = getNodeValue("BANK_ACCOUNT_NOTICE");
            String strHomeAddr1 = getNodeValue("HOME_ADDR1");
            String strHomeAddr2 = getNodeValue("HOME_ADDR2");
            String strHomeAddr3 = getNodeValue("HOME_ADDR3");
            String strOfficeAddr1 = getNodeValue("OFFICE_ADDR1");
            String strOfficeAddr2 = getNodeValue("OFFICE_ADDR2");
            String strOfficeAddr3 = getNodeValue("OFFICE_ADDR3");
            String strCorrespondingAddr = getNodeValue("CORRESPONDING_ADDR");
            String strDayPhoneCtyCode = getNodeValue("TEL1");
            String strDayPhoneAreaCode = getNodeValue("TEL2");
            String strDayPhoneNo = getNodeValue("TEL3");
            String strEveningPhoneCtyCode = getNodeValue("EVEPHONE1");
            String strEveningPhoneAreaCode = getNodeValue("EVEPHONE2");
            String strEveningPhoneNo = getNodeValue("EVEPHONE3");
            String strMobileCtyCode = getNodeValue("MOBILE1");
            String strMobileAreaCode = getNodeValue("MOBILE2");
            String strMobileNo = getNodeValue("MOBILE3");
            String strFaxCtyCode = getNodeValue("FAX1");
            String strFaxAreaCode = getNodeValue("FAX2");
            String strFaxNo = getNodeValue("FAX3");
            String strEmail = getNodeValue("EMAIL");
            String strLang = getNodeValue("PREFER_LANG");
            String strStreamProd = getNodeValue("PREFER_STREAM_PROD");
            String strDefAccNo = getNodeValue("DEF_ACCOUNT_NUM");
            String strEMPR_Type = getNodeValue("EMPR_TYPE");
            accountProfileVO.setEnglishName(strEngName);
            accountProfileVO.setBankAccountNum(strBankAccNum);
            accountProfileVO.setBankAccountName(strBankAccName);
            accountProfileVO.setBankAccountCurrency(strBankAccCur);
            accountProfileVO.setBankAccountNotice(strBankAccNotice);
            accountProfileVO.setHomeAddress1(strHomeAddr1);
            accountProfileVO.setHomeAddress2(strHomeAddr2);
            accountProfileVO.setHomeAddress3(strHomeAddr3);
            accountProfileVO.setOfficeAddress1(strOfficeAddr1);
            accountProfileVO.setOfficeAddress2(strOfficeAddr2);
            accountProfileVO.setOfficeAddress3(strOfficeAddr3);
            accountProfileVO.setCorrespondingAddr(strCorrespondingAddr);
            accountProfileVO.setDaytimePhoneCountryCode(strDayPhoneCtyCode);
            accountProfileVO.setDaytimePhoneAreaCode(strDayPhoneAreaCode);
            accountProfileVO.setDaytimePhoneTelNo(strDayPhoneNo);
            accountProfileVO.setEveningPhoneCountryCode(strEveningPhoneCtyCode);
            accountProfileVO.setEveningPhoneAreaCode(strEveningPhoneAreaCode);
            accountProfileVO.setEveningPhoneTelNo(strEveningPhoneNo);
            accountProfileVO.setMobilePhoneCountryCode(strMobileCtyCode);
            accountProfileVO.setMobilePhoneAreaCode(strMobileAreaCode);
            accountProfileVO.setMobilePhoneTelNo(strMobileNo);
            accountProfileVO.setFaxCountryCode(strFaxCtyCode);
            accountProfileVO.setFaxAreaCode(strFaxAreaCode);
            accountProfileVO.setFaxTelNo(strFaxNo);
            accountProfileVO.setEmail(strEmail);
            accountProfileVO.setPreferLang(strLang);
            accountProfileVO.setPreferStreamProd(strStreamProd);
            accountProfileVO.setDefaultAccountNo(strDefAccNo);
            accountProfileVO.setEmpr_type(strEMPR_Type);
            return accountProfileVO;
        }
    }
}
